<?php include 'checkSessionForAuthen.php'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Bảng Điều Khiển</title>
        <link rel="stylesheet" href="../css/admin-style.css" type="text/css" media="all" />
    </head>

    <body>
        <?php
        include("../service/generalControlService.php");
        include "header.php";
        ?>
        <!--end header-->
        <!-- Container -->
        <form action="" method="get">
            <div id="container">
                <div class="shell">
                    <br />
                    <!-- Main -->
                    <div id="main">
                        <div class="cl">&nbsp;</div>

                        <!-- Content -->
                        <div id="content">        
                            <!-- Box -->
                            <div class="box">
                                <!-- Box Head -->
                                <div class="box-head">
                                    <h2>Báo Cáo Tổng Hợp</h2>
                                </div>
                                <!-- End Box Head -->

                                <div class="table">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <th width="200">Tên Thông Số</th>
                                            <th>Giá Trị</th>
                                        </tr>
                                        <tr>
                                            <td>Tổng số lần lập giới thiệu:</td>
                                            <td>
                                                <?php
                                                $result1 = countIntroduction();
                                                $row1 = mysql_fetch_array($result1);
                                                echo $row1["NUMINS"];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Số tài khoản người dùng:</td>
                                            <td>
                                                <?php
                                                $result2 = countUser();
                                                $row2 = mysql_fetch_array($result2);
                                                echo $row2["NUMUSER"];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tổng số loại thức ăn:</td>
                                            <td>
                                                <?php
                                                $result3 = countCategory();
                                                $row3 = mysql_fetch_array($result3);
                                                echo $row3["NUMCAT"];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tổng số thực đơn:</td>
                                            <td>
                                                <?php
                                                $result4 = countDish();
                                                $row4 = mysql_fetch_array($result4);
                                                echo $row4["NUMDISH"];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Tổng số tuyển dụng:</td>
                                            <td>
                                                <?php
                                                $result5 = countRecruitment();
                                                $row5 = mysql_fetch_array($result5);
                                                echo $row5["NUMREC"];
                                                ?>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <!-- End Box -->

                        </div>
                        <!-- End Content -->



                        <div class="cl">&nbsp;</div>			
                    </div>
                    <!-- Main -->
                </div>
            </div>
            <!-- End Container -->
            <!--footer-->
            <?php include "footer.php"; ?>
            <!--end footer-->
            <?php ConnectionManager::getInstance()->closeConnection(); ?>
        </form>
    </body>
</html>